package v.show.health.server.configure;

import de.codecentric.boot.admin.server.domain.entities.InstanceRepository;
import de.codecentric.boot.admin.server.notify.Notifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author whz
 */
@Configuration
public class AlertNotifierConfiguration {

    @Value("${spring.profiles.active}")
    private String env;

    @Bean
    public Notifier createDingTalkNotifier(InstanceRepository repository) {
        return new AlertNotifier(repository, env);
    }
}